home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / tritonrexx376.lha / TritonRexx / Rexx / Cycle.rexx < prev    next >
OS/2 REXX Batch file  |  1995-09-16  |  2KB  |  77 lines

  1. /* Cycle.rexx */
  2.  
  3. IF ~SHOW('LIBRARIES','tritonrexx.library') THEN DO
  4.    IF ~ADDLIB('tritonrexx.library',10,-30,0) THEN DO
  5.       SAY 'Kann die <tritonrexx.library> nicht öffnen!'
  6.       EXIT(10)
  7.    END
  8. END
  9.  
  10. cyclelist.0 = 7
  11. cyclelist.1 = 'Montag'
  12. cyclelist.2 = 'Dienstag'
  13. cyclelist.3 = 'Mittwoch'
  14. cyclelist.4 = 'Donnerstag'
  15. cyclelist.5 = 'Freitag'
  16. cyclelist.6 = 'Samstag'
  17. cyclelist.7 = 'Sonntag'
  18.  
  19. windowtags =   WindowID(1),
  20.                WindowTitle('Cycle'),
  21.                   'VertGroupA',
  22.                      'Space',
  23.                      'HorizGroupAC',
  24.                         'Space',
  25.                         TextID("_Cycle",7),
  26.                         'Space',
  27.                         CycleGadget('cyclelist',0,7),
  28.                         'Space',
  29.                      'EndGroup',
  30.                      'Space',
  31.                   'EndGroup',
  32.                'EndProject'
  33.  
  34. app = TR_CREATEAPP('TRCA_Name Cycle')
  35.  
  36. IF app ~= '00000000'x THEN DO
  37.  
  38.    window = TR_OPENPROJECT(app,windowtags)
  39.  
  40.    IF window ~= '00000000'x THEN DO
  41.       ende = 0
  42.  
  43.       DO WHILE ende ~= 1
  44.          CALL TR_WAIT(app,'')
  45.  
  46.          DO WHILE TR_HANDLEMSG(app,'event')
  47.             IF event.trm_class = 'TRMS_NEWVALUE' THEN DO
  48.                SELECT
  49.                   WHEN event.trm_id = 7 THEN DO
  50.                      nummer = event.trm_data+1
  51.  
  52.                      SAY 'Ausgewählt:' nummer '=' cyclelist.nummer
  53.                   END
  54.  
  55.                   OTHERWISE
  56.                      NOP
  57.                END
  58.             END
  59.  
  60.             IF event.trm_class = 'TRMS_CLOSEWINDOW' THEN DO
  61.                nummer = TR_GETATTRIBUTE(window,7,'TRAT_Value')+1
  62.  
  63.                SAY 'Ausgewählt war:' nummer '=' cyclelist.nummer
  64.  
  65.                ende = 1
  66.             END
  67.          END
  68.       END
  69.  
  70.       CALL TR_CLOSEPROJECT(window)
  71.    END
  72.  
  73.    CALL TR_DELETEAPP(app)
  74. END
  75.  
  76. EXIT(0)
  77.